<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 200px;
            height: 200px;
            background-color: brown;
        }
    </style>
</head>

<body>
    <div></div>
    <script>
        /*
           移动端：用手指替代鼠标的操作。
        */
        var div = document.querySelector('div');
        //   手指接触DOM元素
        div.addEventListener('touchstart', () => {
            console.log("我触摸到了屏幕");
        });
        //   手指移动  
        div.addEventListener('touchmove', () => {
            console.log("手指移动");
        });
        //  手指离开
        div.addEventListener('touchef', () => {
            console.log("手指离开");
        });
    </script>
</body>

</html>